<h3>Please Submit 3 References</h3>
	<p>
		<?php echo $info ?>
	</p>
	<div id="ref_list">
		<?php echo $this->Session->flash('rl'); ?>
		<span>Added References</span>
		<table cellpadding="0" cellspacing="0">
			<tr><th>Reference Name:</th><th>Contact Phone:</th><th>Email Address:</th><th>Reference Received:</th><th>Delete Reference:</th></tr>
		<?php
		
		foreach ($data as $line => $ref) {
			echo (($line+1)%2==1)? '<tr class="odd">': '<tr class="even">';
			echo "\n<td>{$ref['Reference']['firstname']} {$ref['Reference']['lastname']}</td>";
			echo "\n<td>{$ref['Reference']['phone']}</td>";
			echo "\n<td>{$ref['Reference']['email']}</td>";
			echo "\n<td>";
			echo ($ref['Reference']['complete'])? 'Yes':'No';
			echo '</td>';
			echo "\n<td>";
			if (!$ref['Reference']['complete']) {
				echo $this->Js->link('delete', 
						array('controller' => 'References', 'action' => 'delete',  $ref['Reference']['id']), 
						array('update' => '#ref_list'), null, 'Are you sure you want do delete this reference?');
			} else {
				echo '&nbsp;';
			}
			echo "</td>";
			echo '</tr>';
		}
		?>
		</table>
	</div><!--end ref_list-->
	<hr />
	<?php echo $this->Form->create('Reference', array('action' => 'add', 'default' => 'false')); ?>
	<?php echo $this->Form->input('application_id', array('type' => 'hidden', 'value' => $app_id)); ?>
	<fieldset><legend>Reference Contact Information</legend>
	<?php echo $this->Form->input('firstname', array('label' => 'First Name')); ?>
	<?php echo $this->Form->input('lastname', array('label' => 'Last Name')); ?>
	<?php echo $this->Form->input('title', array('label' => 'Position Title')); ?>
	<?php echo $this->Form->input('phone', array('label' => 'Contact Phone')); ?>
	<?php echo $this->Form->input('email', array('label' => 'Contact Email')); ?>
	</fieldset>
	<p>
		<?php echo $ferpa ?>
	</p>
	<?php echo $this->Form->input('ferpa_waived', array('label' => '', 'options' => array('1' => 'I do', '0'=> 'I do not'),
																											'after' => ' <em>Waive my right to review this report in accordance with the family Educational Rights & Privacy act of 1974.</em>', 
																											'div' => 'chk')); ?>
	<?php echo $use_web ?>
	<?php echo $this->Form->input('use_web', array('type' => 'checkbox', 'checked' => true, 'label' => 'Use Web', 'div' => 'chk')); ?>
	<?php echo $this->Js->submit('Add Reference', array('update' => '#ref_list', 'url' => array('controller' => 'References', 
	                                                                                         		'action' => 'add', $app_id))); ?>
	<?php echo $this->Form->end() ?>
